<?php

/**
 * File helper class.
 *
 * @version  $Id: file.php 2 2009-10-02 23:06:43Z perfilev $
 * @package  System
 */

class File
{
	/**
	 * @var object  FileInfo class.
	 */
	public static $fi;
	
	/**
	 * Returns the extension of the given file.
	 *
	 * @param  string  $path  Path to the file.
	 * @return mixed
	 */
	public static function extension($path)
	{
		$basename = basename($path);
		$dot = strrpos($basename, '.');
		return (false === $dot) ? false : substr($basename, $dot + 1);
	}
}